import { CardDetail } from '@/types/detail'
import { sphHttp } from '@/utils/request.ts'

/**
 * @description 商品详情
 * @param skuId 
 * @returns 
 */
export const reqCardDetail = (skuId: number) => {
  return sphHttp<CardDetail>(`/api/item/${skuId}`, 'GET')
}

/**
 * @description 加入购物车
 * @param skuId 
 * @param skuName 
 * @returns 
 */
export const reqAddCart = (skuId:any, skuNum:any) => {
  return sphHttp(`/api/cart/addToCart/${skuId}/${skuNum}`, 'POST')
}

